<html DIR="LTR" xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:tool="http://www.microsoft.com/tooltip"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=Windows-1252"></META><META NAME="save" CONTENT="history"></META><title>Configuring Check-in Policies</title><STYLE TYPE="text/css">
    body
    {
        background:    #FFFFFF;
        color: #000000;
        font-family:    Verdana;
        font-size: medium;
        font-style: normal;
        font-weight: normal;
        margin-top:    0;
        margin-bottom:    0;
        margin-left:    0;
        margin-right:    0;
        width:    100%;
    }
    
    a
    {
        color:    #0000FF;
    }
    
    a:visited
    {
        color:    #0000FF;
    }
    
    a:link
    {
        color:    #0000FF;
    }
    
    a:hover
    {
        color:    #FF0000;
        cursor: hand;
    }
    
    a:active
    {
        color:    #FF0000;
        cursor: hand;
    }
    
    div#mainSection
    {
        font-size: 70%;
        width: 100%;
    }
    
    div#mainBody
    {
        font-size: 90%;
        margin-left:    5;
        margin-top: 10;
        padding-bottom: 20;
    }
    
    div#header
    {
        background-color: #D4DFFF;
        padding-top:    0;
        padding-bottom:    0;
        padding-left:    0;
        padding-right:    0;
        width:    100%;
    }
    
    div#header table
    {
        border-bottom-color: #C8CDDE;
        border-bottom-style: solid;
        border-bottom-width: 1;
        width:    100%;
    }
    
    span#runningHeaderText
    {
        color: #003399;
        font-size: 90%;
    }
    
    span#nsrTitle
    {
        color: #003399;
        font-size: 125%;
        font-weight: 600;
    }
    
    div#header table td
    {
        color: #0000FF;
        font-size: 70%;
        margin-top:    0;
        margin-bottom:    0;
        padding-right: 20;
    }
    
    div#header table tr#headerTableRow3 td
    {
        padding-bottom: 2;
        padding-top: 5;
    }
    
    div#header table#bottomTable
    {
        border-top-color: #FFFFFF;
        border-top-style: solid;
        border-top-width: 1;
        text-align: left;
    }
    
    div#footer
    {
        font-size: 90%;
        margin-top:    0;
        margin-bottom:    0;
        margin-left:    0;
        margin-right:    0;
        padding-top:    2;
        padding-bottom:    2;
        padding-left:    2;
        padding-right:    2;
        width:    100%;
    }
    
    hr#footerHR
    {
        border-bottom-color: #EEEEFF;
        border-bottom-style: solid;
        border-bottom-width: 1;
        border-top-color: C8CDDE;
        border-top-style: solid;
        border-top-width: 1;
        height: 3;
        color: #D4DFFF;
    }
    
    div.section
    {
        padding-top:    2;
        padding-bottom:    2;
        padding-left:    16;
        padding-right:    15;
        width:    100%;
    }
    
    .heading
    {
        font-weight:    bold;
        margin-top:        18;
        margin-bottom:    8;
    }
    
    h1.heading
    {
        color: #003399;
        font-size:    125%;
    }
    
    .subHeading
    {
        font-weight:    bold;
        margin-bottom:    4;
    }
    
    h3.subHeading
    {
        color:  #003399;
        font-size: 115%;
        font-weight: bold;
    }
    
    h4.subHeading
    {
        color: #003399;
        font-size: 105%;
    }
    
    h5.subHeading
    {
        color: #003399;
        font-size: 100%;
    }
    
    img.toggle
    {
    	border: 0;
	margin-right: 5;
    }

    img.copyCodeImage
    {
	border: 0;
	margin-right: 3;
    }

    img.downloadCodeImage
    {
	border: 0;
	margin-right: 3;
    }

    img.viewCodeImage
    {
	border: 0;
	margin-right: 3;
    }

    img.note
    {
	border: 0;
	margin-right: 3;
    }

    img#languageFilterImage
    {
	border: 0;
	margin-left: 10;
	vertical-align: middle;
    }

    img#membersOptionsFilterImage
    {
	border: 0;
	margin-left: 10;
	vertical-align: middle;
    }

    img#toggleAllImage
    {
	margin-left: 4;
	vertical-align: middle;
    }
    
    div#mainSection table
    {
        border: 0;
        font-size: 100%;
        width:    100%;
    }
    
    div#mainSection table th
    {
        background:    #EFEFF7;
        border-bottom-color: #C8CDDE;
        border-bottom-style: solid;
        border-bottom-width: 1;
        color: #000066;
        padding-left: 5;
        padding-right: 5;
    }
    
    div#mainSection table td
    {
        background:    #F7F7FF;
        border-top-color: #FFFFFF;
        border-top-style: solid;
        border-top-width: 1;
        padding-left: 5;
        padding-right: 5;
    }
    
    div#mainSection table td.imageCell
    {
        white-space: nowrap;
    }
    
    div.code table
    {
        border: 0;
        font-size: 95%;
        margin-bottom: 5;
        width: 100%
    }
    
    div.code table th
    {    
        background:    #EFEFF7;
        border-bottom-color: #C8CDDE;
        border-bottom-style: solid;
        border-bottom-width: 1;
        color: #000066;
        font-weight: bold;
        padding-left: 5;
        padding-right: 5;
    }
    
    div.code table td
    {
        background:    #F7F7FF;
        border-top-color: #FFFFFF;
        border-top-style: solid;
        border-top-width: 1;
        padding-left: 5;
        padding-right: 5;
        padding-top: 5;
    }
    
    div.alert table
    {
        border: 0;
        font-size: 100%;
        width:    100%;
    }
    
    div.alert table th
    {
        background:    #EFEFF7;
        border-bottom-width: 0;
        color: #000066;
        padding-left: 5;
        padding-right: 5;
    }
    
    div.alert table td
    {
        background:    #F7F7FF;
        border-top-color: #FFFFFF;
        border-top-style: solid;
        border-top-width: 1;
        padding-left: 5;
        padding-right: 5;
    }
    
    .copyCode
    {
        color: #0000ff;
        font-size: 90%;
        font-weight: normal;
    }
    
    .downloadCode
    {
        color: #0000ff;
        font-size: 90%;
        font-weight: normal;
    }
    
    .viewCode
    {
        color: #0000ff;
        font-size: 90%;
        font-weight: normal;
    }
    
    div.code pre
    {
        font-family:    Monospace, Courier New, Courier;
        font-size: 105%;
        color:    #000066;
        word-wrap:    break-word;
    }
    
    code
    {
        font-family:    Monospace, Courier New, Courier;
        font-size: 105%;
        color:    #000066;
    }
    
    dl
    {
        margin-top:    0;
        padding-left:    1;
    }
    
    dt
    {
        font-style:    italic;
    }
    
    dd
    {
        margin-bottom:    0;
        margin-left:    0;
    }
    
    ul
    {
        margin-left: 17;
        list-style-type: disc;
    }
    
    ul ul
    {
        margin-bottom: 4;
        margin-left: 17;
        margin-top: 3;
        list-style-type: disc;
    }
    
    ol
    {
        margin-left: 24;
        list-style-type: decimal;
    }
    
    ol ol
    {
        margin-bottom: 4;
        margin-left: 24;
        margin-top: 3;
        list-style-type: lower-alpha;
    }
    
    li
    {
        margin-bottom: 3;
    }
    
    p
    {
        margin-top: 0;
        margin-bottom: 15;
    }
    
    .tip
    {
        color:    #0000FF;
        font-style: italic;
        cursor:hand;
        text-decoration:underline;
    }
    
    .languageFilter
    {
        color:    #0000FF;
        cursor:hand;
        text-decoration:underline;
        padding-bottom:4;
    }
    
    .math
    {
        font-family: Times New Roman;
        font-size: 125%
    }
    
    .sourceCodeList
    {
        font-family: Verdana;
        font-size: 90%;    
    }
    
    pre.viewCode
    {
        width: 100%;
        overflow: auto;
    }
    
    MSHelp\:link
    {
        text-decoration: underline;
        color: #0000ff; 
        hoverColor: #3366ff;
        filterString: ;
    }
</STYLE>
</head>
<body><input type="hidden" id="userDataCache" class="userDataStyle"></input><input type="hidden" id="hiddenScrollOffset"></input><img id="dropDownImage" style="display:none; height:0; width:0;" src="drpdown.gif"><img id="dropDownHoverImage" style="display:none; height:0; width:0;" src="drpdown_orange.gif"><img id="collapseImage" style="display:none; height:0; width:0;" src="collapse.gif"><img id="expandImage" style="display:none; height:0; width:0;" src="exp.gif"><img id="copyImage" style="display:none; height:0; width:0;" src="copycode.gif"><img id="copyHoverImage" style="display:none; height:0; width:0;" src="copycodeHighlight.gif"><div id="header"><table width="100%" id="topTable"><tr id="headerTableRow1"><td align="left"><span id="runningHeaderText"></span></td></tr><tr id="headerTableRow2"><td align="left"><span id="nsrTitle">Configuring Check-in Policies</span></td></tr><tr id="headerTableRow3"></tr></table></div><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory"></div>
				<p>You can use check-in policies to enforce development practices in your organization. Check-in policies are enforced when team members check in changes. If you try to check in pending changes that violate the policy, your check-in is blocked. If necessary, you can override these policies.</p>
				<div class="alert"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Important </th></tr><tr><td>
					Check-in policies that you define by using Team Explorer Everywhere only apply when you check in by using the Team Foundation Server plug-in for Eclipse or the Cross-platform Command-line Client for Team Foundation Server. If you use another client, such as Team Web Access
 or Team Explorer
 in Visual Studio
, these policies do not apply. Similarly, policies that you define by using Team Web Access
 or Team Explorer
 in Visual Studio
 are not applied when you check in by using the Team Foundation Server plug-in for Eclipse or the Cross-platform Command-line Client for Team Foundation Server.<p></p>
				</td></tr></table><p></p></div>
				<p>Check-in policies can require the user to take specific actions when they check in files to version control. For example, a user can be required to associate a work item with a changeset. By default, the following check-in policy types are available:</p>
				<ul><li class="unordered">
						
							<b>Builds:</b> Requires that the last build was successful before a check-in.<br /><br />
						This policy does not queue a build. It verifies the results of the most recent build.<br /><br />
					</li><li class="unordered">
						
							<b>Changeset Comments:</b> Requires users to provide a non-empty comment when they check in pending changes.<br /><br />
					</li><li class="unordered">
						
							<b>Forbidden Patterns:</b> Prevents users from checking in files that have forbidden filename patterns in the server path of the change. You might do this to prevent changes to a section of your application.<br /><br />
					</li><li class="unordered">
						
							<b>Work Items:</b> Requires that one or more work items is associated with the check-in.<br /><br />
					</li><li class="unordered">
						
							<b>Work Item Queries:</b> Requires that each changeset is associated with one or more work items from a specified query.<br /><br />
					</li></ul>
				<p>
					<b>In this topic</b>
				</p>
				<ul><li class="unordered">
						
							<a href="#AddPolicies">Add Check-in Policies</a>
						<br /><br />
					</li><li class="unordered">
						
							<a href="#ModifyPolicies">Modify Check-in Policies</a>
						<br /><br />
					</li><li class="unordered">
						
							<a href="#EnableDisablePolicy">Enable or Disable Check-in Policies</a>
						<br /><br />
					</li><li class="unordered">
						
							<a href="#RemovePolicies">Remove Check-in Policies</a>
						<br /><br />
					</li><li class="unordered">
						
							<a href="#RestrictScope">Restrict the Scope of a Check-in Policy</a>
						<br /><br />
					</li></ul>
				<p>
					<b>Required Permissions</b>
				</p>
				<p>To complete this procedure, you must have the <b>Edit project-level information</b> permission set to <b>Allow</b>. For more information, see the following page on the Microsoft Web site: <a href="http://go.microsoft.com/fwlink/?LinkID=182567" target="_blank" alt=""><linkText xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">Team Foundation Server Permissions</linkText></a>.</p>
			<a name="AddPolicies"></a><a name="configurecheckinpolicies#AddPolicies"></a><h1 class="heading">Add Check-in Policies</h1><div id="sectionSection0" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
					<div class="subSection" xmlns=""><ddue:steps xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"><ol class="ordered" xmlns=""><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In <b>Team Explorer</b>, right-click the team project for which you want to define check-in policies and click <b>Check-in Policies</b>.</p>
									<p xmlns="">The <b>Check-in Policies</b> dialog box appears.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Click <b>Add</b>.</p>
									<p xmlns="">The <b>Add Check-in Policy</b> dialog box appears.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In the <b>Check-in Policy</b> list, specify the type of policy that you want to define and then click <b>OK</b>.</p>
									<ul xmlns=""><li class="unordered">
											Specify <b>Build Policy</b> if you want to require that a previous build was successful before any new changes can be checked in.<br /><br />
										</li><li class="unordered">
											Specify <b>Changeset Comments Policy</b> if you want to require that users provide a non-empty comment when they check in pending changes.<br /><br />
										</li><li class="unordered">
											Specify <b>Forbidden Patterns Policy</b> if you want to prevent users from checking in files that have forbidden filename patterns in the server path of the change.<br /><br />
										</li><li class="unordered">
											Specify <b>Work Item Policy</b> if you want to require that one or more work items is associated with each changeset.<br /><br />
										</li><li class="unordered">
											Specify <b>Work Item Query Policy</b> if you want to require that each changeset is associated with one or more work items from the specified query.<br /><br />
										</li></ul>
									<p xmlns="">If you specified <b>Build Policy</b>, the <b>Build Policy Settings</b> dialog box appears. If you specified <b>Work Item Query Policy</b>, the <b>Choose Your Query</b> dialog box appears. If you specified <b>Forbidden Patterns Policy</b>, the <b>Forbidden Patterns</b> dialog box appears.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">If you specified <b>Build Policy</b>, perform the following tasks in the <b>Build Policy Settings</b> dialog box:</p>
								</content>
								<ddue:steps><ol class="ordered"><li>
										<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
											<p xmlns="">On the <b>General</b> tab, specify the items that must build cleanly before a check-in is allowed.</p>
											<p xmlns="">You can specify the pending file, the project that contains the pending file, or the entire workspace.</p>
										</content>
									</li><li>
										<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
											<p xmlns="">(Optional) On the <b>Markers</b> tab, specify one or more Eclipse resource markers that, if found with the specified attributes, will prevent a check-in.</p>
										</content>
									</li><li>
										<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
											<p xmlns="">Click <b>OK</b>.</p>
										</content>
									</li></ol></ddue:steps>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">If you specified <b>Work Item Query Policy</b>, in the <b>Choose Your Query</b> dialog box, click the query that defines the list of work items that can be associated with a changeset, and then click <b>OK</b>.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">If you specified <b>Forbidden Patterns</b>, perform the following tasks in the <b>Forbidden Patterns</b> dialog box:</p>
								</content>
								<ddue:steps><ol class="ordered"><li>
										<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
											<p xmlns="">In <b>New Expression</b>, type a regular expression that matches the server paths of changes that you want to disallow and then click <b>Add</b>.</p>
										</content>
									</li><li>
										<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
											<p xmlns="">(Optional) Add expressions that you want to disallow.</p>
											<div class="alert" xmlns=""><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left">Note </th></tr><tr><td>
												A pending change will violate the check-in policy if it matches any of the configured regular expressions.<p></p>
											</td></tr></table><p></p></div>
										</content>
									</li><li>
										<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
											<p xmlns="">Click <b>OK</b> to save the set of expressions.</p>
										</content>
									</li></ol></ddue:steps>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">If you want to add another check-in policy, repeat steps 2 through 5.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Click <b>OK</b> to save your changes.</p>
									<p xmlns="">All policies that you added will now be enforced.</p>
								</content>
							</li></ol></ddue:steps></div>
				</content></div><a name="ModifyPolicies"></a><a name="configurecheckinpolicies#ModifyPolicies"></a><h1 class="heading">Modify Check-in Policies</h1><div id="sectionSection1" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
					<p xmlns="">If you defined build or work item query check-in policies, you can modify the details of those check-in policies. Changeset comments and work item policies have no details that you can configure. You can remove those policies, but you cannot modify them. For more information, see <a href="#RemovePolicies">Remove Check-in Policies</a>.</p>
					<div class="subSection" xmlns=""><ddue:steps xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"><ol class="ordered" xmlns=""><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In <b>Team Explorer</b>, right-click the team project for which you want to define check-in policies and click <b>Check-in Policies</b>.</p>
									<p xmlns="">The <b>Check-in Policies</b> dialog box appears.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In the list, click the check-in policy that you want to modify.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Click <b>Edit</b>.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">If you want to modify a <b>Build Policy</b>, perform the following tasks in the <b>Build Policy Settings</b> dialog box:</p>
								</content>
								<ddue:steps><ol class="ordered"><li>
										<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
											<p xmlns="">On the <b>General</b> tab, specify the items that must build cleanly before a check-in is allowed.</p>
											<p xmlns="">You can specify the pending file, the project that contains the pending file, or the entire workspace.</p>
										</content>
									</li><li>
										<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
											<p xmlns="">(Optional) On the <b>Markers</b> tab, specify one or more Eclipse resource markers that, if found with the specified attributes, will prevent a check-in.</p>
										</content>
									</li><li>
										<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
											<p xmlns="">Click <b>OK</b>.</p>
										</content>
									</li></ol></ddue:steps>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">If you want to modify a <b>Work Item Query Policy</b>, in the <b>Choose Your Query</b> dialog box, click the query that defines the list of work items that can be associated with a changeset, and then click <b>OK</b>.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Click <b>OK</b> to save your changes.</p>
								</content>
							</li></ol></ddue:steps></div>
				</content></div><a name="EnableDisablePolicy"></a><a name="configurecheckinpolicies#EnableDisablePolicy"></a><h1 class="heading">Enable or Disable Check-in Policies</h1><div id="sectionSection2" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
					<p xmlns="">If you want to temporarily remove a check-in policy but retain it for future use, you can disable it. You might do this, for example, if you have configured a complex build policy and do not want to have to re-create it later.</p>
					<div class="subSection" xmlns=""><ddue:steps xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"><ol class="ordered" xmlns=""><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In <b>Team Explorer</b>, right-click the team project for which you want to define check-in policies and click <b>Check-in Policies</b>.</p>
									<p xmlns="">The <b>Check-in Policies</b> dialog box appears.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In the <b>Enabled</b> column of the list, perform one or more of the following tasks:</p>
									<ul xmlns=""><li class="unordered">
											Select the check box that corresponds to a check-in policy that you want to enable.<br /><br />
										</li><li class="unordered">
											Clear the check box that corresponds to a check-in policy that you want to disable.<br /><br />
										</li></ul>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Click <b>OK</b> to save your changes.</p>
								</content>
							</li></ol></ddue:steps></div>
				</content></div><a name="RemovePolicies"></a><a name="configurecheckinpolicies#RemovePolicies"></a><h1 class="heading">Remove Check-in Policies</h1><div id="sectionSection3" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
					<p xmlns="">If you want to temporarily remove a build check-in policy or a work item query check-in policy, you should consider disabling that policy instead of removing it. By disabling the policy, you retain the policy details and can re-enable that policy later.</p>
					<div class="subSection" xmlns=""><ddue:steps xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"><ol class="ordered" xmlns=""><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In <b>Team Explorer</b>, right-click the team project for which you want to define check-in policies and click <b>Check-in Policies</b>.</p>
									<p xmlns="">The <b>Check-in Policies</b> dialog box appears.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In the list, click the check-in policy that you want to remove.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Click <b>Remove</b>.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Click <b>OK</b> to save your changes.</p>
								</content>
							</li></ol></ddue:steps></div>
				</content></div><a name="RestrictScope"></a><a name="configurecheckinpolicies#RestrictScope"></a><h1 class="heading">Restrict the Scope of a Check-in Policy</h1><div id="sectionSection4" class="section"><content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
					<p xmlns="">In Team Explorer Everywhere, you can restrict the scope of a check-in policy to control to which files the policy applies. You can specify one or more regular expressions to limit a check-in policy so it is only applied to items that match any of the configured expressions. If no expressions are specified, the check-in policy is applied to all items in the team project.</p>
					<p xmlns="">
						<b>Example Expressions</b>
					</p>
					<h3 class="subHeading" xmlns=""></h3><table xmlns=""><tr>
								<th>
									If you want to define a policy that applies to the following:
								</th>
								<th>
									Specify this expression:
								</th>
							</tr><tr>
							<td>
								<p>All files that end with .java</p>
							</td>
							<td>
								<div class="code"><span codeLanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left"></th><th align="right"><span class="copyCode" onclick="CopyCode(this)" onkeypress="CopyCode_CheckKey(this)" style="cursor:default;" onmouseover="ChangeCopyCodeIcon(this)" onfocusin="ChangeCopyCodeIcon(this)" onmouseout="ChangeCopyCodeIcon(this)" onfocusout="ChangeCopyCodeIcon(this)" tabindex="0"></span></th></tr><tr><td colspan="2"><pre>.*\.java$</pre></td></tr></table></span></div>
							</td>
						</tr><tr>
							<td>
								<p>All items in a project named Inventory</p>
							</td>
							<td>
								<div class="code"><span codeLanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left"></th><th align="right"><span class="copyCode" onclick="CopyCode(this)" onkeypress="CopyCode_CheckKey(this)" style="cursor:default;" onmouseover="ChangeCopyCodeIcon(this)" onfocusin="ChangeCopyCodeIcon(this)" onmouseout="ChangeCopyCodeIcon(this)" onfocusout="ChangeCopyCodeIcon(this)" tabindex="0"></span></th></tr><tr><td colspan="2"><pre>^\$/Inventory/.*</pre></td></tr></table></span></div>
							</td>
						</tr><tr>
							<td>
								<p>All items in a folder named Framework</p>
							</td>
							<td>
								<div class="code"><span codeLanguage="other"><table width="100%" cellspacing="0" cellpadding="0"><tr><th align="left"></th><th align="right"><span class="copyCode" onclick="CopyCode(this)" onkeypress="CopyCode_CheckKey(this)" style="cursor:default;" onmouseover="ChangeCopyCodeIcon(this)" onfocusin="ChangeCopyCodeIcon(this)" onmouseout="ChangeCopyCodeIcon(this)" onfocusout="ChangeCopyCodeIcon(this)" tabindex="0"></span></th></tr><tr><td colspan="2"><pre>.*/Framework/.*</pre></td></tr></table></span></div>
							</td>
						</tr></table>
					<p xmlns="">You can test your scope expressions before you save them.</p>
					<div class="subSection" xmlns=""><ddue:steps xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"><ol class="ordered" xmlns=""><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In <b>Team Explorer</b>, right-click the team project for which you want to define check-in policies and click <b>Check-in Policies</b>.</p>
									<p xmlns="">The <b>Check-in Policies</b> dialog box appears.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">In the list, click the check-in policy for which you want to specify a scope.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Click <b>Scope</b>.</p>
									<p xmlns="">The <b>Scope Expressions</b> dialog box appears.</p>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Perform one or more of the following tasks:</p>
									<ul xmlns=""><li class="unordered">
											To add an expression, in <b>New expression</b>, type a regular expression and then click <b>Add</b>.<br /><br />
											The expression is added to the list of expressions in the <b>Configured Expressions</b> list.<br /><br />
										</li><li class="unordered">
											To remove an expression from the <b>Configured Expressions</b> list, click the expression and then click <b>Delete</b>.<br /><br />
										</li><li class="unordered">
											To test the set of expressions, in <b>Type a full server path to check if policies will be evaluated for it</b>, type the full path to an item on the server.<br /><br />
											For example, you might type <b>$/AdventureWorks/main/billing-service/src/main/java/com/contoso/billingservice/ClassC.java</b>. In Result, a message appears that indicates whether policies will be evaluated for the specified path. The message also indicates which regular expression matched the path.<br /><br />
										</li></ul>
								</content>
							</li><li>
								<content xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
									<p xmlns="">Click <b>OK</b> to save your changes.</p>
								</content>
							</li></ol></ddue:steps></div>
				</content></div><h1 class="heading"><span id="seeAlsoNoToggle">See Also</span></h1><div id="seeAlsoSection" class="section"><h4 class="subHeading">Concepts</h4><a href="setqualitygates.htm" target="_blank">Setting and Enforcing Quality Gates</a><br /><br /></div><!--[if gte IE 5]>
			<tool:tip element="seeAlsoToolTip" avoidmouse="false"/><tool:tip element="languageFilterToolTip" avoidmouse="false"/>
		<![endif]--></div><div id="footer"><hr /><p /></div></div></body></html>